<form class="form-horizontal" name="form1" ng-submit="onSubmit(form1)">
  <div class="modal-header">
    <button type="button" class="close" ng-click="cancel()">
      <span aria-hidden="true">&times;</span>
    </button>
    <h4 class="modal-title">
      <i class="fa fa-cog text-warning"></i>
      {{'http.headers'|translate}}

    </h4>
  </div>
  <div class="modal-body">

    <div class="form-group">
      <label class="col-sm-4 control-label" for="name">
        Content-Type:
      </label>
      <div class="col-sm-7">
        <input type="text" ng-model="headers.ContentType" id="ContentType" class="input-md form-control" />
      </div>
    </div>


    <div class="form-group">
      <label class="col-sm-4 control-label" for="ContentEncoding">
        Content-Encoding:
      </label>
      <div class="col-sm-7">
        <input type="text" ng-model="headers.ContentEncoding" id="ContentEncoding" class="input-md form-control" />
      </div>
    </div>

    <div class="form-group">
      <label class="col-sm-4 control-label" for="CacheControl">
        Cache-Control:
      </label>
      <div class="col-sm-7">
        <input type="text" ng-model="headers.CacheControl" id="CacheControl" class="input-md form-control" />
      </div>
    </div>

    <div class="form-group">
      <label class="col-sm-4 control-label" for="ContentDisposition">
        Content-Disposition:
      </label>
      <div class="col-sm-7">
        <input type="text" ng-model="headers.ContentDisposition" id="ContentDisposition" class="input-md form-control" />
      </div>
    </div>

    <div class="form-group">
      <label class="col-sm-4 control-label" for="ContentLanguage">
        Content-Language:
      </label>
      <div class="col-sm-7">
        <input type="text" ng-model="headers.ContentLanguage" id="ContentLanguage" class="input-md form-control" />
      </div>
    </div>

    <div class="form-group">
      <label class="col-sm-4 control-label" for="Expires">
        Expires:
      </label>
      <div class="col-sm-7">
        <input type="text" ng-model="headers.Expires" id="Expires" class="input-md form-control" />
      </div>
    </div>

    <div class="clearfix">&nbsp;</div>
    <fieldset>
      <legend>
        <h5>{{'userMetaData'|translate}}
         <!-- 用户自定义元数据 -->
          <a href="" class="pull-right btn btn-xs btn-success" ng-click="metaItems.unshift({key:'',value:''})"><i class="fa fa-plus"></i> {{'add'|translate}}</a>
        </h5>
      </legend>

      <table class="table table-condensed table-bordered">
        <tr>
          <th>{{'key'|translate}}</th>
          <th>{{'value'|translate}}</th>
          <th>{{'actions'|translate}}</th>
        </tr>
        <tr ng-repeat="meta in metaItems">
          <td>
            <div class="input-group input-group-sm">
              <span class="input-group-addon">x-oss-meta-</span>
              <input class="form-control" type="text" ng-model="meta.key">
            </div>
          </td>
          <td>
            <input class="input-sm form-control" type="text" ng-model="meta.value">
          </td>
          <td>
            <a href="" class="text-danger" ng-click="metaItems.splice($index,1)">{{'delete'|translate}}</a>
          </td>
        </tr>
      </table>
    </fieldset>


    <div class="clearfix"></div>
  </div>
  <div class="modal-footer">
    <button type="submit" class="btn btn-success btn-sm">
      <i class="glyphicon glyphicon-ok"></i>
      {{'ok'|translate}}
      <!-- 确定 -->
    </button>
    <button type="button" class="btn btn-default btn-sm" ng-click="cancel()">
      <i class="glyphicon glyphicon-remove"></i>
      {{'cancel'|translate}}
      <!-- 取消 -->
    </button>
  </div>
</form>
